#define _CRT_SECURE_NO_WARNINGS 1
#include"list.h"

using namespace Study;

void test_1()
{
	List<int> lt;
	lt.push_back(1);
	lt.push_back(2);
	lt.push_back(3);
	lt.push_back(4);


	for (auto e : lt)
	{
		std::cout << e << " ";
	}
	std::cout << std::endl;

	/*List<int>::iterator it = lt.begin();
	while (it != lt.end())
	{
		std::cout << *it << " ";
		++it;
	}
	std::cout <<  std::endl;*/

	/*List<int>::const_iterator it =lt.begin();
	while (it != lt.end())
	{
		std::cout << *it << " ";
	}
	std::cout << std::endl;*/

}

void test_2()
{
	List<int> lt;
	lt.push_back(1);
	lt.push_back(2);
	lt.push_back(3);
	lt.push_back(4);
	lt.push_back(5);

	List<int> lt1(lt);

	for (auto e : lt)
	{
		std::cout << e << " ";
	}
	std::cout << std::endl;

	for (auto e : lt1)
	{
		std::cout << e << " ";
	}
	std::cout << std::endl;

	List<int> lt2;
	lt2.push_back(10);
	lt2.push_back(200);
	lt2.push_back(30);
	lt2.push_back(40);
	lt2.push_back(50);

	lt1 = lt2;
	for (auto e : lt1)
	{
		std::cout << e << " ";
	}
	std::cout << std::endl;

	for (auto e : lt2)
	{
		std::cout << e << " ";
	}
	std::cout << std::endl;
}

struct AA
{
	AA(int a1 = 0, int a2 = 0)
		:_a1(a1)
		, _a2(a2)
	{}

	int _a1;
	int _a2;
};


int main()
{
	test_2();

	return 0;
}